package javapoker;
public class Karta{
    private short wartosc, kolor;

    private static String[] kolory = { "kier", "pik", "karo", "trefl" };
    private static String[] wartosci  = { "As", "2", "3", "4", "5", "6", "7", 
                                       "8", "9", "10", "Walet", "Dama", "Krol" };

    public static String rankAsString( int __wartosc ) {
        return wartosci[__wartosc];
    }

    Karta(short kolor, short wartosc)
    {
        this.wartosc=wartosc;
        this.kolor=kolor;
    }

    public @Override String toString()
    {
          return wartosci[wartosc] + "  " + kolory[kolor];
    }

    public short getRank() {
         return wartosc;
    }

    public short getSuit() {
        return kolor;
    }
}